import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
//这样会导致一个问题 就是后续的路由出错不会抛出异常
// const originalPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push(location) {
//   return originalPush.call(this, location).catch(err => console.warn(err))
// }
const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import(/*webpackChunkName:'login' */"../pages/Login")
  },
];

const router = new VueRouter({
  routes,
});

export default router;
